package com.b1502.store2.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.b1502.store2.R;

/**
 * 作者： 南山君
 * 时间：2017/2/28.16:47
 */

public class UserRechargeAdapter extends BaseAdapter {

    Context context;

    public UserRechargeAdapter(Context context) {
        this.context = context;
    }

    @Override
    public int getCount() {
        return 10;
    }

    @Override
    public Object getItem(int i) {
        return null;
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int i, View convertView, ViewGroup viewGroup) {

        ViewHolder viewHolder;

        if (convertView==null){

            viewHolder=new ViewHolder();

            convertView=View.inflate(context, R.layout.listview_recharge,null);

            viewHolder.tv_time_recharge= (TextView) convertView.findViewById(R.id.tv_time_recharge);

            viewHolder.tv_mymoney_recharge= (TextView) convertView.findViewById(R.id.tv_mymoney_recharge);

            viewHolder.tv_use_recharge= (TextView) convertView.findViewById(R.id.tv_use_recharge);

            viewHolder.tv_pay_recharge= (TextView) convertView.findViewById(R.id.tv_pay_recharge);

            convertView.setTag(viewHolder);
        }else {

            viewHolder= (ViewHolder) convertView.getTag();

        }

        return convertView;
    }

    class ViewHolder{

        TextView tv_pay_recharge;

        TextView tv_use_recharge;

        TextView tv_mymoney_recharge;

        TextView tv_time_recharge;

    }
}
